<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<style>
  .box{
    width: 200px;
    height: 200px;
    border: 1px solid blue;
    font-size: 30px;
    margin-top: 10px;
  }

  .big {
    width: 400px;
    height: 400px;
  }

  .pink {
    background-color: hotpink;
  }

</style>
  
<body>


  <div id="app">
    <!-- 绑定 :class="数组 / 对象" -->

    <!-- 
      <div :class="{ 类名1:bool , 类名2:bool}"></div>
      <div :class="[类名1,类名2]"></div> 
    -->
    <!-- 绑定style  :style="{样式名:值 , 样式名:值 , 样式名:值 , 样式名:值 }" -->

    <div :class="['box','pink','big']" @click="flag=!flag">四姐开关</div>
    <div :class="{'box':true,'pink':flag,'big':false}">四姐</div>
    <!-- background-color   font-size -->
    <div :style="{backgroundColor:'yellowgreen' , fontSize:'30px', }">四姐</div>

  </div>

  <script src="./js/vue2.6.12.js"></script>

  <script>

    var app = new Vue({
      el:'#app',
      data:{
        flag:true
      },
      methods:{
        
      }
    })

  </script>
</body>
</html>